
package com.uit.ecommerce.bo;

import com.uit.ecommerce.access.mapper.CityMapper;
import com.uit.ecommerce.dto.CityDTO;
import java.util.ArrayList;

public class CityBO {
public ArrayList<CityDTO> GetAllCity() throws Exception{
    CityMapper CM=new CityMapper();
    return CM.GetAllCity();
}
public CityDTO getCityByID(String Id) throws Exception{
    CityMapper CM=new CityMapper();
    return CM.GetCityById(Id);
}
public CityDTO getCityByName(String Name) throws Exception{
    CityMapper CM=new CityMapper();
    return CM.GetCityByName(Name);
}
public boolean checkCityExit(String ID) throws Exception{
    CityMapper CM=new CityMapper();
    return CM.IsIdExisted(ID);
}
public ArrayList<CityDTO> GetAllCityByAreaCode(String AreaCode) throws Exception{
    CityMapper CM=new CityMapper();
    return CM.GetCityByAreaCode(AreaCode);
}
public ArrayList<CityDTO> GetAllCityByAreaName(String Area) throws Exception{
    CityMapper CM=new CityMapper();
    return CM.GetCityByAreaName(Area);
}
public void InsertCity(CityDTO cls) throws Exception{
    CityMapper CM=new CityMapper();
    CM.InsertCity(cls);
}
public void DeleteCity(String Id) throws Exception{
    CityMapper CM=new CityMapper();
    CM.DeleteCity(Id);
}
}
